Brief Full Advanced Search Search Tips
|  |  | To access the contents, click the chapter and section titles. Visual Basic 6 Programming Blue Book: The Most Complete, Hands-On Resource for Writing Programs with Microsoft Visual Basic 6! (Publisher: The Coriolis Group) Author(s): Peter G. Aitken ISBN: 1576102815 Publication Date: 08/01/98 Search this book:
Previous | Table of Contents | Next
## Chapter 8 ActiveX Components ActiveX is hot, and Visual Basic lets you join the party. One of Visual Basic’s strong points is its ability to use existing software components that provide sophisticated functionality for your project, freeing you from writing the code or designing the interface. Although controls represent an example of a software component, they are not the only type. Since the introduction of Visual Basic, this notion of software components has continued to expand. In fact, many of the industry’s movers and shakers now consider it central to their vision of the future of desktop computing. If you are programming for the Windows operating system, the most important software component technology you need to master is ActiveX. In this chapter, we will see exactly what ActiveX technology is, and we will work through a project in which you create your own ActiveX software component. ### What’s In A Name? A number of years ago, programmers realized that the functionality of software would be greatly enhanced if capabilities could be shared among programs. Let me illustrate with an example. Suppose you were creating a report using a word processor and needed to include a table of figures and calculations in your document. Your spreadsheet program is perfectly suited to creating such a table, but how could you access the spreadsheet program from within your word processor? The answer: Object Linking and Embedding, or OLE. With OLE, you can insert a spreadsheet object within a word processor document—in other words, create a compound document. While working in the word processor, you can activate the spreadsheet object, which starts the spreadsheet program and allows you to work on the table just as if it were a regular spreadsheet (which, in many ways, it is). When you exit the spreadsheet program, the table, with all of the changes you made, would display in the word processor document. OLE is based on a broader technology called the Component Object Model, or COM. As this technology spread well beyond the creation of compound documents, the name OLE came to be applied to anything that used the COM paradigm—including, but not limited to, compound document capabilities. Not too long ago, a new term entered the scene: ActiveX. Initially, ActiveX referred to technologies that used the COM paradigm for Internet and World Wide Web-related tasks. Before long, however, ActiveX came to subsume more and more of the entire COM world—regardless of whether a specific item was related to the Internet. The term OLE has gone back to its original, more limited meaning involving the creation of compound documents. This is where we stand today—although nothing is quite as sure as change, especially in the world of computers. Whenever you hear the term ActiveX realize that it refers to a wide range of COM-based techniqu